//
//  ReadSpecificViewController.m
//  NeteaseNews
//
//  Created by liutaifeng on 16/4/25.
//  Copyright © 2016年 liutaifeng. All rights reserved.
//

#import "ReadSpecificViewController.h"
#import "LTFSpecificView.h"

@interface ReadSpecificViewController ()
@property (nonatomic, retain) LTFSpecificView *spectificView;
@property (nonatomic, retain) UIView *myView;
@property (nonatomic, retain) UIButton *backButton;
@end

@implementation ReadSpecificViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self createView];
}
- (void)createView {
    self.spectificView = [[LTFSpecificView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 64)];
    
    [self.view addSubview:_spectificView];
    [_spectificView release];
    _spectificView.string = self.string;
    self.myView = [[UIView alloc] initWithFrame:CGRectMake(0, 24, self.view.frame.size.width, 40)];
    
    _myView.backgroundColor = [UIColor whiteColor];
    
    self.backButton = [UIButton buttonWithType:UIButtonTypeSystem];
    _backButton.frame = CGRectMake(0, 0, 40, 40);
    [_backButton setImage:[UIImage imageNamed:@"fanhui.png"] forState:UIControlStateNormal];
    [_myView addSubview:_backButton];
    _backButton.tintColor = [UIColor lightGrayColor];
    [_backButton addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)viewWillAppear:(BOOL)animated {
    [self.navigationController.view addSubview:_myView];
}
- (void)viewWillDisappear:(BOOL)animated {
    [self.myView removeFromSuperview];
}

- (void)click:(UIButton *)button {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
@end
